package com.stillalive.mybatis.service;

import com.stillalive.mybatis.mapper.UserInfoMapper;
import com.stillalive.mybatis.model.UserInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class UserInfoService {

    @Autowired
    private UserInfoMapper userInfoMapper;
    public List<UserInfo> getUser() {
        return userInfoMapper.selectAll();
    }

    public UserInfo getUserById(Integer id) {
        return userInfoMapper.selectById(id);
    }
}
